1. Field of the Invention
This invention relates to a query system for searching database based upon SGML. The invention is a query system designed for working on hierarchical structures. It provides queries with operators and operations to retrieve and modify any element in a hierarchical structure. To construct a result, the query language in the invention binds on one hierarchical data source or multiple hierarchical data sources for adopting some child structures, getting prototype of a desired part, and cascading with property data inside.
2. Description of the Related Art
Many hierarchical data formats became the standards of technologies including SGML (Standard Generalized Markup Language), HTML (Hyper Text Markup Language), and XML (Extensible Markup Language). Among them, SGML is the most basic one. The rest are its derivatives. The HTML 4 is considered to be an application of SGML, and XML is considered to be a subset of SGML. Many query languages have been disclosed for the purpose of extracting and modifying SGML data. These published data query systems or prior arts adopt SQL-like languages. Some of them use FLWOR expressions (FOR, LET, WHERE, ORDERED BY, RETURN), and others use constructs like SELECT-WHERE similar to SQL. However, SQL is dealing with relational databases that are not hierarchically structured, and actually, are of one single level structured. This innate scope makes SQL-Like query languages less constructible than a query language that is directly defined on hierarchal structures of multiple levels. The invention is directly defined on and designed on hierarchical structures. It is a complement to the approach in all of the related arts. The major techniques in the query language of the invention are the use of CRUST operators that are cast operator, restrict operator, unique operator, sort operator, and traverse operator.
U.S. Patent Application Publication No. 2007/0219959 A1 by Kanemasa and published on Sep. 20, 2007, describes a query language for XML (named “XML-QL”), which has a SELECT-WHERE construct, similar to SQL, and borrows features of various query languages for semi-constructed data. Kanemasa does not suggest use of the CRUST operators on hierarchical structures or set operations on property lists to retrieve and construct SGML data according to the claimed invention.
U.S. Pat. No. 6,665,677 B1 issued to Wotring on Dec. 13, 2003, allows data to be transformed from a relational database to a hierarchical database. Wotring does not suggest use of the CRUST operators on hierarchical structures or set operations on property lists to retrieve and construct SGML data according to the claimed invention.
J. Jaakkola and P. Kilpeläinen, “Using sgrep for querying structured text files”, Proceedings of SGML Finland 1996, Espoo, Finland, Oct. 4-5, 1996, implement an algebra of unrestricted text fragments called regions. The algebra allows the retrieval of document components, represented as regions, based on conditions on their relative containment and ordering. J. Jaakkola and P. Kilpeläinen do not suggest use of the CRUST operators on hierarchical structures or set operations on property lists to retrieve and construct SGML data.
J. Le Maitre, E. Murisasco, M. Rolbert, “SgmIQL, a language for querying SGML documents”, Proceedings of the 4th European Conference on Information Systems, Lisbon, Portugal, Jul. 2-4, 1996, present a complete SGML query language based on SQL-like expressions. The language uses pattern-matching primitives, which are integrated into common operators, such as SELECT/FROM/WHERE. J. Le Maitre, E. Murisasco, and M. Rolbert do not suggest use of the CRUST operators on hierarchical structures or set operations on property lists to retrieve and construct SGML data.
S. Abiteboul, D. Quass, J. McHugh, J. Widom, J. L. Wiener, “The Lorel query language for semistructured data”, International Journal on Digital Libraries, Volume 1, Number 1, 68-88 (1997) present a query language (called the Lorel language”) for querying semi-structured data. Lorel language is written in the SQL/OQL style for querying data. For wide applicability, the simple object model underlying Lorel can be viewed as an extension of the ODMG data model and the Lorel language as an extension of OQL. Abiteboul et al. do not suggest use of the CRUST operators on hierarchical structures or set operations on property lists to retrieve and construct SGML data.
K. Lee, Y. K. Lee, P. B. Berra, “Management of Multi-structured HypermediaDocuments: A Data Model, Query Language, and Indexing Scheme”, Multimedia Tools and Applications, Volume 4, Number 2, 199-223 (1997), propose an object-oriented model for multi-structured hypermedia documents by using unique element identifiers and an indexing schema. K. Lee, Y. K. Lee, P. B. Berra, do not suggest use of the CRUST operators on hierarchical structures or set operations on property lists to retrieve and construct SGML data.
A. Duetsch, M. Fernandez, D. Florescu, A. Levy, D. Suciu, “XML-QL: A Query Language for XML”, Submission to the World Wide Web Consortium 19 Aug. 1998, introduce the XML, which is SQL-like and adopts FLWOR expressions (FOR, LET, WHERE, ORDERED BY, RETURN). A. Duetsch, M. Fernandez, D. Florescu, A. Levy, D. Suciu, do not suggest use of the CRUST operators on hierarchical structures or set operations on property lists to retrieve and construct SGML data.
N. Fuhr and K. Grobjohann, “XIRQL: a query language for information retrieval in XML documents”, SIGIR '01 Proceedings of the 24th annual international ACM SIGIR conference on Research and development in information retrieval, add the features of weighting and ranking to XML and provide related query optimization. N. Fuhr and K. Grobjohann do not suggest use of the CRUST operators on hierarchical structures or set operations on property lists to retrieve and construct SGML data.